﻿<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8"/>
	<title>标题</title>
	<link href="common.css" type="text/css" rel="stylesheet"/>
	<script type="text/javascript" src="onecore.js"></script>
	<script type="text/javascript">
function chkInput( elem )
{
    var val = elem.value;
	
	if( $.trim(val) == '' )
	    return false;
	else
	    return true;
};
	
function chkForm()
{
    var $input = $('input',this), i = 0, l = $input.length,
	    re = true, firstDom;
	
	for( ; i < l; i++ )
	{
	    if( !chkInput($input[i]) )
		{
		    showMsg( $input[i] );
			re = false;
			
			if( !firstDom )
			    firstDom = $input[i];
		}
		else
		{
		    hideMsg( $input[i] );
		}
	}
	
	if( firstDom )
	    firstDom.focus();
	
	return re;
};

function showMsg( elem )
{
    if( elem.id == 'account' )
	    $('#tipacc').html('请输入电子邮箱').css({display:'block'});
	else if( elem.id == 'passwd' )
	    $('#tippwd').html('请输入密码').css({display:'block'});
};

function hideMsg( elem )
{
    if( elem.id == 'account' )
	    $('#tipacc').css({display:'none'});
	else if( elem.id == 'passwd' )
	    $('#tippwd').css({display:'none'});
};

$(function(){
	$('#account')[0].focus();
	$('#account').bind('focus',function(){
	    $('#lacc').css({display:'none'});
	}).bind('blur',function(){
	    $('#lacc').css({display:'block'});
	}).bind('keydown',function(){
	    $('#lacc').css({display:'none'});
	});
	
    $('#passwd').bind('focus',function(){
	    $('#lpwd').css({display:'none'});
	}).bind('blur',function(){
	    $('#lpwd').css({display:'block'});
	});
	
	$('#js_login_form').bind('submit',chkForm);
});
	</script>
</head>

<body>
    <div class="header">
	    <h1 class="logo"><a href="#">logo</a></h1>
		<ul class="top-nav">
		    <li><a href="javascript:;">网盘</a></li>
			<li><a href="javascript:;">圈子</a></li>
			<li><a href="javascript:;">应用</a></li>
			<li><a href="javascript:;">游戏</a></li>
			<li><a href="javascript:;">好友</a></li>
		</ul>
		<ul class="top-login">
		    <li><a href="javascript:;">登录</a></li>
			<li><a href="javascript:;">注册</a></li>
		</ul>
	</div>
	<div class="main">
	    <div class="screen-box">
		    <div class="login-box">
			    <div class="top-reg"><a href="https://passport.115.com/?ct=register" class="button btn-reg">立即注册，抢15G免费网盘</a></div>
				<form id="js_login_form" action="?" method="post" rel="login">
				    <dl class="login-form">
					    <dt><strong>帐号</strong><a href="https://passport.115.com/?ct=forgot_account">找回帐号</a></dt>
						<dd>
						    <label id="lacc" for="account">请输入E-mail/手机号码/数字帐号</label>
							<input type="text" name="login[account]" id="account" class="text" errortype="notempty" errmsgtype="1" value="" tabindex="1" errmsg="请输入电子邮箱"/>
							<div id="tipacc" class="popup-hint" style="display:none;"></div>
						</dd>
						<dt><strong>密码</strong> <a href="https://passport.115.com/?ct=forgot_passwd">忘记密码？</a></dt>
						<dd>
						    <label id="lpwd" for="passwd">请输入您的密码</label>
							<input type="password"  name="login[passwd]" id="passwd" errortype="notempty" errmsgtype="1" class="text" tabindex="2" errmsg="请输入密码" />
							<div id="tippwd" class="popup-hint" style="display:none;"></div>
						</dd>
						<dd class="login-save">
						    <input type="checkbox" id="autologin" name="login[time]" tabindex="4" />
							<label for="autologin">保持我的登录状态</label>
						</dd>
						<dd class="login-bottom">
						    <button type="submit" class="button btn-login"><i>登录</i></button>
						</dd>
					</dl>
				</form>
				<dl class="access-box">
				
				</dl>
			</div>
		</div>
	</div>
</body>
</html>
